{% extends "bootstrap/base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block styles %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
    p{
        font-size:2vh;
    }
    #main{
        padding:5vh
    }
    .shadow-box{
        box-shadow:0 0 2vh #aaaaaa
    }
    .padding-box{
        padding:2vh
    }
</style>
{% endblock %}

{% block scripts %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script>
{% endblock %}

{% block title %}登录{% endblock %}

{% block content %}
    <div id="main">
        {% if username %}
            <h1>登录成功！</h1>
            <div class="shadow-box">
                <div class="padding-box">
                    <h2>用户名: {{ username }}</h2>
                    <h2>密码: {{ password }}</h2>
                </div>
            </div>
        {% else %}
            <h1>登录</h1>
            <div class="shadow-box">
                    <div class="padding-box">
                        {{ wtf.quick_form(form) }}
                    </div>
            </div>
        {% endif %}
    </div>
{% endblock %}
